<?php
/*
$route['*']['/'] = array('BlogController', 'home');

$route['*']['/page/:pindex'] = array('BlogController', 'page');

$route['*']['/article/:postId'] = array('BlogController', 'getArticle');

$route['*']['/archive/:year/:month'] = array('BlogController', 'getArchive');
$route['*']['/archive/:year/:month/page/:pindex'] = array('BlogController', 'getArchive');

$route['*']['/tag/:name'] = array('BlogController', 'getTag');
$route['*']['/tag/:name/page/:pindex'] = array('BlogController', 'getTag');

$route['*']['/comment/submit'] = array('BlogController', 'newComment');
*/

//admin home page
$route['*']['/admin'] =
$route['*']['/admin/post'] = array('AdminController', 'home',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./image/index');

//admin list posts pagination
/*
$route['*']['/admin/page/:pindex'] =
$route['*']['/admin/post/page/:pindex'] = array('AdminController', 'page',
                                                'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

//admin list posts Sorting (asc/desc) and pagination
$route['*']['/admin/sort/:sortField/:orderType'] =
$route['*']['/admin/post/sort/:sortField/:orderType'] =
$route['*']['/admin/post/sort/:sortField/:orderType/page/:pindex'] = array('AdminController', 'sortBy',
                                                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

//admin edit Post
$route['*']['/admin/post/edit/:pid'] = array('AdminController', 'getArticle',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

$route['post']['/admin/post/save'] = array('AdminController', 'savePostChanges',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');


//admin create Post
$route['*']['/admin/post/create'] = array('AdminController', 'createPost',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

$route['post']['/admin/post/saveNew'] = array('AdminController', 'saveNewPost',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

//admin delete Post
$route['*']['/admin/post/delete/:pid'] = array('AdminController', 'deletePost',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

//admin list unapproved comments
$route['*']['/admin/comment'] = array('AdminController', 'listComment',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

$route['*']['/admin/comment/approve/:cid'] = array('AdminController', 'approveComment',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

$route['*']['/admin/comment/reject/:cid'] = array('AdminController', 'rejectComment',
                              'authName'=>'Blog Admin', 'auth'=>array('admin'=>'1234'), 'authFailURL'=>'./error/loginFail');

*/
//error displays
$route['*']['/error'] = array('ErrorController', 'defaultError');
$route['*']['/error/loginFail'] = array('ErrorController', 'loginError');
$route['*']['/error/postNotFound/:pid'] = array('ErrorController', 'postError');
$route['*']['/error/fomatError'] = array('ErrorController', 'fomatError'); // $this->render('error', $this->data);
$route['*']['/error/postSuccess'] = array('ErrorController', 'postSuccess'); 

$route['*']['/image/add'] = array('ImageController', 'add');
$route['*']['/image/index'] = array('ImageController', 'index');
$route['*']['/image/addPage'] = array('ImageController', 'addPage');
$route['*']['/image/typePage'] = array('ImageController', 'typePage');
$route['*']['/image/contactPage'] = array('ImageController', 'contactPage');
$route['*']['/image/artistPage'] = array('ImageController', 'artistPage');
$route['*']['/image/artistPage'] = array('ImageController', 'artistPage'); //
$route['*']['/image/artistProuctPage'] = array('ImageController', 'artistProuctPage'); //modelPage
$route['*']['/image/modelPage'] = array('ImageController', 'modelPage');
$route['*']['/image/download'] = array('ImageController', 'download');
$route['*']['/image/login_page'] = array('ImageController', 'login_page');
$route['*']['/image/signup_page'] = array('ImageController', 'signup_page');
$route['*']['/image/login'] = array('ImageController', 'login');
$route['*']['/image/logout'] = array('ImageController', 'logout');
$route['*']['/image/signup'] = array('ImageController', 'signup');
$route['*']['/image/del'] = array('ImageController', 'del');
$route['*']['/image/editPage'] = array('ImageController', 'editPage');
$route['*']['/image/update'] = array('ImageController', 'update');
$route['*']['/image/info'] = array('ImageController', 'info');

$route['*']['/image/type/:typeid'] = array('ImageController', 'getListByType');
$route['*']['/image/type/:typeid/page/:pageindex'] = array('ImageController', 'getListByType');
$route['*']['/image/showJs/:typeid/:imageid'] = array('ImageController', 'showJs');
$route['*']['/gen_model'] = array('MainController', 'gen_models', 'authName'=>'Model Generator', 'auth'=>array('admin'=>'1234'), 'authFail'=>'Unauthorized!');


?>